home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / DH_AutoHoldOn.lha / dh-autoholdon / DH-AutoHoldOn.clrexx next >
Text File  |  1996-12-28  |  4KB  |  2 lines

  1. /* Optimized with RexxOpt 1.8 */
  2. if ~show('L','cl_rexx.library') then;do;if ~addlib('cl_rexx.library',0,-30,0) then exit 10;end;if ~show('L','rexxsupport.library') then;do;if ~addlib('rexxsupport.library',0,-30,0) then exit 10;end;if ~show('L','rexxsyslib.library') then;do;if ~addlib('rexxsyslib.library',0,-30,0) then exit 10;end;call close STDOUT;if~open(STDOUT,'t:lastcallsystems','W') then;exit 20;else;do;call close STDIN;call open STDIN,'*',R;call pragma '*';end;confanz=CL_GETTEXT('Connectline:Prefs/DH-Autoholdon.para',conf);noanz=CL_GETTEXT('Connectline:Prefs/DH-Autoholdon.no',no);do n=4 to noanz-1;laststd=conf.4;laststd=laststd*24;address command;'c:lastpollall >t:lastpoll.txt';if ~exists('t:lastpoll.txt') then exit;lastanz=cl_gettext('t:lastpoll.txt',last);do a=0 to lastanz-3;Tage=left(last.a,3);if tage=NOC then;tage=0;stunden=substr(last.a,5,2);if stunden=LL then;stunden=0;system=substr(last.a,13,8);system=compress(System);if no.n=system then;call keineauswertung;domain=substr(last.a,28,40);domain=compress(domain);art=substr(last.a,73,8);art=compress(art);lastcallstd=(tage*24)+stunden;if lastcallstd>laststd then;call holdonpre;else;say system' ruft regelmaessig an, der letzte Anruf war vor 'Tage' Tagen und 'Stunden' Stunden.';say '';end;call close STDOUT;call open STDIN,'*',R;address command;'delete >NIL: t:lastpoll.txt';empanz=CL_GETTEXT('Connectline:Prefs/DH-Autoholdon.emp',emp)-1;do e=0 to empanz;call cl_sendmailfull('DH-AutoHoldOn',emp.e,'t:lastcallsystems',,,'Der Bericht von DH-AutoHoldOn',TEXT,'A ');end;address command;'delete >NIL: t:lastcallystems';exit;keineauswertung:;say 'Für das System 'system' findet keine Auswertung statt.';tage=0;stunden=0;return;holdonpre:;say system 'hat seit' Tage 'Tage und' Stunden 'Stunden nicht mehr angerufen.';if ~exists('CONNECTLINE:prefs/hold') then;do;call makedir('CONNECTLINE:prefs/hold');end;if exists('CONNECTLINE:Prefs/hold/hold_'system) then say 'Das System steht schon auf Hold On!';else;call holdon;return;holdon:;if ~open('out','CONNECTLINE:Prefs/hold/hold_'system,W) then;do;say 'Konnte Ausgabedatei nicht öffnen !';exit;end;say 'Setze System auf Hold On!';say '';say 'Durchsuche Verteiler nach System 'system'.';b=CLGET_BoardList(brett);if b=0 then;do;say 'Keine Brettliste gefunden !';exit 20;end;if b>0 then;do;do i=0 to b-1;call testforsystem;end;end;say 'Das System wurde erfolgreich auf Hold On gesetzt.';call close 'out';call CL_SaveBoardList();say 'Versende Nachricht an 'system;datei='Connectline:Prefs/DH-Autoholdon.txt';if art=Point then;do;call pointmail;end;if art=Box then;do;call boxmail;end;pointmail:;call CL_SendMailFull(Maps,domain,datei,,,'Deine Bretter wurden auf Hold On gesetzt',,A);empanz=CL_GETTEXT('Connectline:Prefs/DH-Autoholdon.emp',emp)-1;do e=0 to empanz;call CL_SendMailFull(Maps,emp.e,datei,,,'Die Bretter von 'system' wurden auf Hold On gesetzt',,A);end;return;boxmail:;sysadr='Sysop@'domain;call CL_SendMailFull(Maps,sysadr,datei,,,'Dein System wurde auf Hold On gesetzt',,A);empanz=CL_GETTEXT('Connectline:Prefs/DH-Autoholdon.emp',emp)-1;do e=0 to empanz;call CL_SendMailFull(Maps,emp.e,datei,,,'Die Bretter von 'system' wurden auf Hold On gesetzt',,A);end;return;testforsystem:;found=false;anzahl=(CLGET_BoardBoxList(brett.i,verteiler))-1;do y=0 to anzahl;if upper(system)=upper(verteiler.y) then found=true;end;if found=true then;do;say 'Gefunden: /'brett.i;call CLSET_BoardDelBox(brett.i,system);call CL_LogAdd('0','MAPS','System 'system' aus /'brett.i' ausgetragen');call writeln 'out',brett.i;end;return